package psbc.daily.dao.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import psbc.daily.dao.model.MyLog;

import java.util.List;

public interface MyLogMapper {
    int insert(MyLog record);

    int insertSelective(MyLog record);

    @Select("select * from my_log where id = #{id}")
    MyLog selectById(@Param("id") int id);

    @Select("select * from my_log where record_date = #{recordDate}")
    List<MyLog> selectByDate(@Param("recordDate") String recordDate);

    @Select("select * from my_log")
    List<MyLog> selectAll();

    @Update("delete from my_log where record_date = #{recordDate}")
    int deleteByDate(@Param("recordDate") String recordDate);

    @Update("delete from my_log where id = #{id}")
    int deleteById(@Param("id") int id);

    int updateSelective(MyLog myLog);


}